/**
 * @file protocol104_integrated.h
 * @brief 104协议库集成头文件
 * @details 本文件集成了104协议库的所有功能，包括日志模块。
 * 
 * @author zyb
 * @date 2025-10-05
 * @version 1.0
 */

#ifndef PROTOCOL104_INTEGRATED_H
#define PROTOCOL104_INTEGRATED_H

/* ==================== 基础类型和错误码 ==================== */
#include "../../types/include/protocol_types.h"
#include "../../error/include/error_codes.h"
#include "../../types/include/constants.h"

/* ==================== 版本信息 ==================== */
#include "version.h"

/* ==================== 日志模块 ==================== */
#include "../../../../../common/logs/include/logger.h"

/* ==================== 通用功能 ==================== */
#include "../../error/include/fault_data.h"
#include "validation_utils.h"
#include "../../types/include/quality_descriptors.h"
#include "time_utils.h"
#include "../../control/validator/include/control_commands.h"
#include "../../transport/include/protocol_transport.h"

/* ==================== 协议层 ==================== */
#include "../../protocol/apdu/include/apdu_assembler.h"
#include "../../protocol/apdu/include/apdu_parser.h"
#include "../../protocol/asdu/include/asdu_assembler.h"
#include "../../protocol/asdu/include/asdu_parser.h"

/* ==================== 控制层 ==================== */
#include "../../control/validator/include/protocol_validator.h"
#include "../../control/statemachine/include/protocol_statemachine.h"
#include "../../control/timeout/include/protocol_timeout.h"
#include "../../control/sequence/include/protocol_sequence.h"
#include "../../control/connection/include/protocol_connection.h"

/* ==================== 数据层 ==================== */
#include "../../data/telemetry/include/telemetry_data.h"
#include "../../data/analog/include/analog_data.h"
#include "../../data/control/include/control_data.h"
#include "../../data/energy/include/energy_data.h"
#include "../../data/pulse/include/pulse_data.h"
#include "../../data/system/include/system_data.h"

/* ==================== 传输层 ==================== */
#include "../../transfer/file/include/file_transfer.h"
#include "../../transfer/upgrade/include/software_upgrade.h"

/* ==================== 参数层 ==================== */
#include "../../parameter/include/parameter_data.h"

/* ==================== 通用工具层 ==================== */
#include "../../../../../common/utils/include/buffer_utils.h"
#include "../../../../../common/utils/include/memory_utils.h"
#include "../../../../../common/utils/include/string_utils.h"

/**
 * @brief 初始化104协议库
 * @details 初始化104协议库，包括日志系统
 * 
 * @return 0表示成功，-1表示失败
 */
int protocol104_init(void);

/**
 * @brief 清理104协议库
 * @details 清理104协议库资源，包括日志系统
 * 
 * @return 0表示成功，-1表示失败
 */
int protocol104_cleanup(void);

/**
 * @brief 获取104协议库版本信息
 * @details 获取104协议库的版本字符串
 * 
 * @return 版本字符串
 */
const char* protocol104_get_version(void);

/**
 * @brief 获取104协议库构建信息
 * @details 获取104协议库的构建信息
 * 
 * @return 构建信息字符串
 */
const char* protocol104_get_build_info(void);

#endif /* PROTOCOL104_INTEGRATED_H */
